From 830b6f10a1e7f9709006a6f16f5168f8d460308b Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Sat, 5 Dec 2015 17:55:38 +0100 Subject: [PATCH] Adwaita: simpler active switch background ...removing the progressbar_fill mixin in the process. --- gtk/theme/Adwaita/_common.scss | 3 ++- gtk/theme/Adwaita/_drawing.scss | 6 ------ gtk/theme/Adwaita/gtk-contained-dark.css | 3 ++- gtk/theme/Adwaita/gtk-contained.css | 3 ++- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 4a1cf5fddd..ce70a87ac5 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1941,9 +1941,10 @@ switch { background-image: linear-gradient(to bottom, mix($bg_color, $borders_color, 60%)); text-shadow: 0 1px transparentize(black, 0.9); &:active { - @include progressbar_fill; color: white; border-color: $selected_borders_color; + background-color: $selected_bg_color; + background-image: none; box-shadow: _widget_edge(); text-shadow: 0 1px transparentize($selected_borders_color, 0.5), 0 0 2px transparentize(white, 0.4); diff --git a/gtk/theme/Adwaita/_drawing.scss b/gtk/theme/Adwaita/_drawing.scss index 4a50c7b918..4649894522 100644 --- a/gtk/theme/Adwaita/_drawing.scss +++ b/gtk/theme/Adwaita/_drawing.scss @@ -463,12 +463,6 @@ @else { box-shadow: none; } } -@mixin progressbar_fill($d:horizontal) { - $dir: if($d==vertical,right,bottom); - background-image: linear-gradient(to $dir, $selected_bg_color 2px, - lighten($selected_bg_color, 6%)); -} - @function headerbar_gradient($c, $tc:lighten($c, 2%)) { // // headerbar gradient helper function diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 92a4a5a850..d2ad788361 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -2494,9 +2494,10 @@ switch { -GtkSwitch-slider-width: 45px; -GtkSwitch-slider-height: 27px; } switch:active { - background-image: linear-gradient(to bottom, #215d9c 2px, #266cb5); color: white; border-color: #0f2b48; + background-color: #215d9c; + background-image: none; box-shadow: 0 1px rgba(238, 238, 236, 0); text-shadow: 0 1px rgba(15, 43, 72, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); } switch:insensitive { diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 2c79a2992b..4116c170b4 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -2500,9 +2500,10 @@ switch { -GtkSwitch-slider-width: 45px; -GtkSwitch-slider-height: 27px; } switch:active { - background-image: linear-gradient(to bottom, #4a90d9 2px, #63a0de); color: white; border-color: #184472; + background-color: #4a90d9; + background-image: none; box-shadow: 0 1px rgba(255, 255, 255, 0); text-shadow: 0 1px rgba(24, 68, 114, 0.5), 0 0 2px rgba(255, 255, 255, 0.6); } switch:insensitive { -- 2.30.2